package com.hou;

import java.io.*;

public class Test04 {

    public static void main(String[] args) throws IOException {
        //jdk10新增打印流三个构造方法,都可以指定编码
        //字符流使用了缓冲区,必须刷新或者关闭
        var writer = new PrintWriter("out.txt", "gbk");
        writer.println("鸡你太美");
        writer.println("鸡你实在是太美");
        writer.close();
    }
}
